#! /bin/bash
export LANG=zh_CN.UTF-8
PRESTO_HOME=/export/server/presto/bin/presto

#改写上述的模板 练习一下如何使用shell执行presto sql

/export/server/presto/bin/presto --catalog hive --server hadoop01:8090 --execute "
CREATE TABLE mysql.online_olap.absent_result
AS
SELECT * FROM hive.edu_das.das_absent_result;

CREATE TABLE mysql.online_olap.late_result
AS
SELECT * FROM hive.edu_das.das_late_result;

CREATE TABLE mysql.online_olap.leave_result
AS
SELECT * FROM hive.edu_das.das_leave_result;

CREATE TABLE mysql.online_olap.signin_result
AS
SELECT * FROM hive.edu_das.das_signin_result;
"